package cn.itcast.bos.service.base.impl;

import cn.itcast.bos.dao.StandardDao;
import cn.itcast.bos.domain.base.Standard;
import cn.itcast.bos.service.base.StandardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
@Service
public class StandardServiceImpl implements StandardService {
    @Autowired
    public StandardDao standardDao;

    public void save(Standard standard) {
        standardDao.save(standard);



    }

    @Override
    public List<Standard> queryAll() {

        return standardDao.findAll();
    }


    public Page<Standard> pageQuery(Pageable pageable) {
        return standardDao.findAll(pageable);
    }
}
